package com.example.a2105_ivideo.buglyTest

import android.os.Bundle
import android.view.View
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import com.example.a2105_ivideo.R

class BuglyActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        enableEdgeToEdge()
        setContentView(R.layout.activity_bugly)

    }

    fun testANR(view: View) {
        //主线程阻塞20秒，模拟ANR
        Thread.sleep(20*1000)
    }

    fun testCrash(view: View) {
        Utils.chu(5,0)
    }
}